﻿using System;

namespace MessagePack.Decoders
{
	// Token: 0x020000B5 RID: 181
	internal class InvalidUInt16 : IUInt16Decoder
	{
		// Token: 0x060002CC RID: 716 RVA: 0x0000BA96 File Offset: 0x00009E96
		private InvalidUInt16()
		{
		}

		// Token: 0x060002CD RID: 717 RVA: 0x0000BA9E File Offset: 0x00009E9E
		public ushort Read(byte[] bytes, int offset, out int readSize)
		{
			throw new InvalidOperationException(string.Format("code is invalid. code:{0} format:{1}", bytes[offset], MessagePackCode.ToFormatName(bytes[offset])));
		}

		// Token: 0x040000D5 RID: 213
		internal static readonly IUInt16Decoder Instance = new InvalidUInt16();
	}
}
